<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [1,2,3,4,5,6]
        var list = []
        for(var i = 0;i<arr.length;i+=2){
            var res = arr.slice(i,i+2)
            list.push(res)
        }
        console.log(list)
    </script>
</body>
</html>